package com.jason.kotlin.gank.repository

import com.jason.kotlin.gank.api.ApiSource
import com.jason.kotlin.gank.api.CaiYunService
import com.jason.kotlin.gank.model.CaiYunApiResponse
import com.jason.kotlin.gank.model.CaiYunResultBean

/**
 * @description: CaiYunApiImpl
 *
 * @author ChenBaoyang
 * @date 4/27/21 10:25
 */
class CaiYunApiImpl : CaiYunApi {

    private var service: CaiYunService =
        ApiSource.getCaiYunWeatherService(CaiYunService::class.java)

    override suspend fun getWeatherFromCaiyun(location: String?): CaiYunApiResponse<CaiYunResultBean> =
        service.getWeatherFromCaiyun(location)
}